local jidang = fk.CreateSkill{
    name = "lingling__jidang",
}
Fk:loadTranslationTable{
    ["lingling__jidang"] = "激荡",
    [":lingling__jidang"] = "出牌阶段限一次，你可以随机装备两张类别不同的装备牌，然后将一张牌当【火攻】或【决斗】使用。",
    ["#lingling__jidang"] = "激荡：随机装备两张类别不同的装备牌",
    ["#lingling__jidang-use"] = "激荡：将一张牌当【火攻】或【决斗】使用",
}
jidang:addEffect("active",{
    max_phase_use_time = 1,
    can_use = function (self, player)
        return self:withinTimesLimit(player,Player.HistoryPhase)
    end,
    card_num = 0,
    target_num = 0,
    card_filter = Util.FalseFunc,
    target_filter = Util.FalseFunc,
    on_use = function (self, room, effect)
        local player = effect.from
        local equipMap = {}
        for _, id in ipairs(room.draw_pile) do
            local card = Fk:getCardById(id)
            local sub_type = card.sub_type
            if card.type == Card.TypeEquip and player:canUseTo(card,player) then
                local list = equipMap[tostring(sub_type)] or {}
                table.insert(list, id)
                equipMap[tostring(sub_type)] = list
            end
        end
        local sub_types = {}
        for k, _ in pairs(equipMap) do
            table.insert(sub_types, k)
        end
        sub_types = table.random(sub_types, 2)
        local cards = {}
        for _, sub_type in ipairs(sub_types) do
            table.insert(cards, table.random(equipMap[sub_type]))
        end
        if #cards > 0 then
            for _, cardID in ipairs(cards) do
                room:useCard{
                    from = player,
                    tos = {player},
                    card = Fk:getCardById(cardID),
                }
            end
        end

        room:askToUseVirtualCard(player, {
            name = { "fire_attack", "duel" },
            skill_name = jidang.name,
            prompt = "#lingling__jidang-use",
            cancelable = false,
            card_filter = {
                n = 1,
            },
        })
    end,
})
return jidang